import request from '@/utils/request'

// 查询调货详情列表
export function listSaleroom(query) {
  return request({
    url: '/admin/platform/transfer/list',
    method: 'get',
    params: query
  })
}

// 查询调货详情详细
export function getSaleroom(id) {
  return request({
    url: '/admin/platform/transfer/' + id,
    method: 'get'
  })
}

// 新增调货详情
export function addSaleroom(data) {
  return request({
    url: '/admin/platform/transfer',
    method: 'post',
    data: data
  })
}

// 修改调货详情
export function updateSaleroom(data) {
  return request({
    url: '/admin/platform/transfer',
    method: 'put',
    data: data
  })
}

// 删除调货详情
export function delSaleroom(id) {
  return request({
    url: '/admin/platform/transfer/' + id,
    method: 'delete'
  })
}

//根据类型分页查询仓库或者门店
export function listStore(data) {
  return request({
    url: '/admin/platform/transfer-order/listByType',
    method: 'post',
    data: data
  })
}
//新增调货单-查询商品规格 //admin/platform/transfer-order/selectProductAttrValueList
export function listProductSpec(data) {
  return request({
    url: '/admin/platform/transfer-order/selectProductAttrValueList',
    method: 'post',
    data: data
  })
}
//新增 /api/admin/platform/transfer-order/save
export function transferOrderSave(data){
  return request({
    url: '/admin/platform/transfer-order/save',
    method: 'post',
    data: data
  })
}
//新增 /api/admin/platform/inventory-transfer/save
export function inventoryTransferSave(data){
  return request({
    url: '/admin/platform/inventory-transfer/save',
    method: 'post',
    data: data
  })
}
//admin/platform/transfer-order/list
export function listTransferOrder(data){
  return request({
    url: '/admin/platform/transfer-order/list',
    method: 'get',
    params: data
  })
}
// 详情 admin/platform/transfer-order/info
export function transferOrderInfo(data){
  return request({
    url: '/admin/platform/transfer-order/info',
    method: 'post',
    data: data
  })
}
//新增采购入库调货单-查询商品规格  /api/admin/platform/purchase-in-warehouse-form/selectPurchaseProductAttrValueList
export function selectPurchaseProductAttrValueList(data){
  return request({
    url: '/admin/platform/purchase-in-warehouse-form/selectPurchaseProductAttrValueList',
    method: 'post',
    data: data
  })
}
//采购新增 /api/admin/platform/purchase-in-warehouse-form/save
export function purchaseInWarehouseFormSave(data){
  return request({
    url: '/admin/platform/purchase-in-warehouse-form/save',
    method: 'post',
    data: data
  })
}
//新增退货出库单 /api/admin/platform/in-or-out-warehouse-orders/add
export function addInOrOutWarehouseOrders(data){
  return request({
    url: '/admin/platform/in-or-out-warehouse-orders/add',
    method: 'post',
    data: data
  })
}